package ltd.hyangyang.vegetable.controller;


import ltd.hyangyang.vegetable.entity.ClassificationNumber;
import ltd.hyangyang.vegetable.entity.History;
import ltd.hyangyang.vegetable.service.HistoryService;
import ltd.hyangyang.vegetable.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/history")
public class HistoryController {

    @Autowired
    private HistoryService historyService;

    @RequestMapping("/distinguishNumber")
    public Result<List<ClassificationNumber>> distinguishNumber(){
        //查询历史识别数据，并将其分类
       List<ClassificationNumber> classificationNumbers = historyService.distinguishNumber();
       return Result.success(classificationNumbers);
    }
}
